const { JSEncrypt } = require('jsencrypt');

const { pubkey } = require('./public');
const { prikey } = require('./private');

const encryptor = new JSEncrypt({
  default_key_size: 2048,
  default_public_exponent: 65537
});
encryptor.setPublicKey(pubkey);

const str = "admin";
const encrypt = (str) => encryptor.encrypt(str);

const result = encrypt(str)
console.log("result:", result);
